package cn.ncupyh.soft.opera;

import cn.ncupyh.soft.book.Book;
import cn.ncupyh.soft.book.BookList;

/**
 * @version 1.8
 * @Author Djx_hmbb
 * @Date 2023/7/22 9:56
 * @注释:
 */
public class ShowOperation implements IOPeration{
    @Override
    public void work(BookList bookList) {
        System.out.println("显示图书!");
        int currentSize = bookList.getUsedSize();
        for (int i = 0; i < currentSize; i++) {
            Book book = bookList.getBook(i);
            System.out.println(book);
        }
    }
}
